White balance is the process of removing unrealistic color casts from images captured by an electronic camera, such that the images provide a true color representation of a scene. For example, objects in the scene that appear white to human eyes are rendered white by white balancing the initial output of an image sensor. Human eyes are very good at judging what is white under different light sources, but image sensors often have great difficulty doing so, and often create unsightly blue, orange or green color casts. Different illuminants, i.e., light sources, have their unique spectral characteristics. The spectral characteristics of a given illuminant may be represented by its color temperatures. The color temperature of a light source is the temperature of an ideal black body radiator that radiates light of comparable hue to the light source. The color temperature refers to the relative warmth or coolness of white light. As the color temperature rises, the light energy increases. Hence, the wavelengths of light emitted by the illuminant become shorter, i.e., shift towards the blue portion of the visible spectrum, and the color hue becomes cooler.
An image sensor capturing images of a scene illuminated by a given illuminant will initially produce images with colors affected by the color temperature of the illuminant. Therefore, many electronic cameras use automatic white balance (AWB) to correct for the color output of the image sensor according to the illuminant. In order to apply AWB, the electronic camera must have AWB parameters, often represented as gains to color channels, for each illuminant. The AWB unit of an electronic camera first determines which illuminant is being used to illuminate the scene. Next, the AWB unit applies the AWB parameters of that illuminant to the image of the scene to provide an image with a more true representation of the colors of the scene.
Typically, to produce a set of AWB parameters for an electronic camera, the electronic camera captures images of a gray object, such as a specially made gray card, under various color temperature illumination conditions representing the range of illuminants encountered in actual use. For example, images are captured under four different reference illuminants: a D65 light source which corresponds to noon daylight and has a color temperature of 6504 degrees, a cool white fluorescent (CWF) lamp with a color temperature of 4230 degrees K, a TL84 fluorescent lamp with a color temperature of 4000 K, and light source A (incandescent tungsten) with a color temperature of 2856 K. Ideally, a manufacturer of electronic cameras with an AWB function, should perform this calibration procedure for each electronic camera produced. However, such a practice is generally too expensive. A common practice in the image sensor industry is to calibrate one or a small number of electronic cameras, called the golden modules, under various illumination conditions, and then apply the resulting AWB parameter set to all other image sensors. However, sensor-by-sensor variation inherently exists due to variation in the spectral properties of, e.g., the spectral properties of the quantum efficiency, the color filter array, and the infrared-cut filter of the image sensor. As a result, using the golden module AWB parameter set for all other image sensors frequently leads to errors.